/*--------------------------------------------------------------
 * File: demo25.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 求两数的最小公倍数
 * Version 0.1
 * Date 2022-01-18 
 * 
 * @copyright Copyright (c) 2022
 * 
----------------------------------------------------------------*/
#include <stdio.h>

int main(int argc, char const *argv[])
{
    int n1, n2, minMultiple;
    printf("请输入两个整数：");
    scanf("%d %d",&n1,&n2);
    minMultiple = (n1>n2) ? n1 : n2;

    while (1)
    {
        if((minMultiple % n1 ==0)&&(minMultiple % n2 ==0))
        {
            printf("%d 和 %d 的最小公倍数是 %d\n",n1,n2,minMultiple);
            break;
        }
        minMultiple++;
    }
    

    return 0;
}

